/*
 * com_cute4j_opengl_OpenGL.cpp  0.4.0 / 2010-12-23
 *
 * Copyright (c) 2010 - 2011, cute4j.com and contributors.
 *
 * This software is licensed under the LGPL version 2.1 license.
 * A copy of this license is included in the file LICENSE-LGPL.txt.
 */
#include "com_cute4j_opengl_OpenGL.h"

#include "Cute4jOpenGL.h"

/*
 * Native implementation for: com.cute4j.opengl.OpenGL
 */

JNIEXPORT void JNICALL
Java_com_cute4j_opengl_OpenGL__1glVertex3f
  (JNIEnv *, jclass, jfloat x, jfloat y, jfloat z)
{
  glVertex3f(x, y, z);
}

JNIEXPORT void JNICALL
Java_com_cute4j_opengl_OpenGL__1glColor3f
  (JNIEnv *, jclass, jfloat r, jfloat g, jfloat b)
{
  glColor3f(r, g, b);
}

JNIEXPORT void JNICALL
Java_com_cute4j_opengl_OpenGL__1glClearColor
  (JNIEnv *, jclass, jfloat r, jfloat g, jfloat b, jfloat a)
{
  glClearColor(r, g, b, a);
}

JNIEXPORT void JNICALL
Java_com_cute4j_opengl_OpenGL__1glShadeModel
  (JNIEnv *, jclass, jint mode)
{
  glShadeModel(mode);
}

JNIEXPORT void JNICALL
Java_com_cute4j_opengl_OpenGL__1glClearDepth
  (JNIEnv *, jclass, jfloat depth)
{
  glClearDepth(depth);
}

JNIEXPORT void JNICALL
Java_com_cute4j_opengl_OpenGL__1glHint
  (JNIEnv *, jclass, jint target, jint mode)
{
  glHint(target, mode);
}

JNIEXPORT void JNICALL
Java_com_cute4j_opengl_OpenGL__1glEnable
  (JNIEnv *, jclass, jint cap)
{
  glEnable(cap);
}

JNIEXPORT void JNICALL
Java_com_cute4j_opengl_OpenGL__1glDepthFunc
  (JNIEnv *, jclass, jint func)
{
  glDepthFunc(func);
}

JNIEXPORT void JNICALL
Java_com_cute4j_opengl_OpenGL__1glClear
  (JNIEnv *, jclass, jint mask)
{
  glClear(mask);
}

JNIEXPORT void JNICALL
Java_com_cute4j_opengl_OpenGL__1glLoadIdentity
  (JNIEnv *, jclass)
{
  glLoadIdentity();
}

JNIEXPORT void JNICALL
Java_com_cute4j_opengl_OpenGL__1glTranslatef
  (JNIEnv *, jclass, jfloat x, jfloat y, jfloat z)
{
  glTranslatef(x, y, z);
}

JNIEXPORT void JNICALL
Java_com_cute4j_opengl_OpenGL__1glRotatef
  (JNIEnv *, jclass, jfloat angle, jfloat x, jfloat y, jfloat z)
{
  glRotatef(angle, x, y, z);
}

JNIEXPORT void JNICALL
Java_com_cute4j_opengl_OpenGL__1glBegin
  (JNIEnv *, jclass, jint mode)
{
  glBegin(mode);
}

JNIEXPORT void JNICALL
Java_com_cute4j_opengl_OpenGL__1glEnd
  (JNIEnv *, jclass)
{
  glEnd();
}

JNIEXPORT void JNICALL
Java_com_cute4j_opengl_OpenGL__1glViewport
  (JNIEnv *, jclass, jint x, jint y, jint width, jint height)
{
  glViewport(x, y, width, height);
}

JNIEXPORT void JNICALL
Java_com_cute4j_opengl_OpenGL__1glMatrixMode
  (JNIEnv *, jclass, jint mode)
{
  glMatrixMode(mode);
}

JNIEXPORT void JNICALL
Java_com_cute4j_opengl_OpenGL__1gluPerspective
  (JNIEnv *, jclass, jdouble fovy, jdouble aspect, jdouble zNear, jdouble zFar)
{
  gluPerspective(fovy, aspect, zNear, zFar);
}

JNIEXPORT jboolean JNICALL
Java_com_cute4j_opengl_OpenGL__1initialize
  (JNIEnv *, jclass)
{
  return QGLFormat::hasOpenGL();
}


